const cds = require("@sap/cds");
const { Options } = cds.entities("ct.object.Options");

class ConfigService extends cds.ApplicationService {
  init() {
    this.after("READ", "Options", async (req) => {
      console.log("Enterred after read ${req}");
    });
    this.before("CREATE", "Options", (req) => {
      console.log("Enterred before CREATE ${req}");
    });
    this.on("createSingleOption", (req) => {
      return {};
    })

    return super.init();
  }
}

module.exports = { ConfigService };
